package com.dmgis.hndz.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;

import com.dmgis.hndz.service.TownshipStationMapper;
import com.dmgis.hndz.service.TownshipStationService;
import com.dmgis.hndz.pojo.TownshipStation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TownshipStationServiceImpl implements TownshipStationService {

    @Autowired
    private TownshipStationMapper townshipStationMapper;

    @Override
    public List<TownshipStation> getList(String jd, String wd, String city) {
        List<TownshipStation> townshipStations = townshipStationMapper.selectList2(jd, wd, city);
        return townshipStations;
    }

    @Override
    public List<TownshipStation> getList1(String city) {
        return townshipStationMapper.selectList1(city);
    }

    @Override
    public List<TownshipStation> getList2(String city) {
        return townshipStationMapper.selectList(Wrappers.<TownshipStation>lambdaQuery()
                .eq(TownshipStation::getCity,city)
                .orderByAsc(TownshipStation::getStationid));
    }

    @Override
    public List<TownshipStation> getList3() {
        return townshipStationMapper.selectList3();
    }


}
